package cmd

import (
	"fmt"

	"gitee.com/eeppee_admin/go-tuiftp/internal/service/ls"
)

type RLsOperation struct {
}

func (l *RLsOperation) ArgsValidation(args []string) error {
	if len(args) == 0 {
		return fmt.Errorf("远程路径不能为空")
	}
	return nil
}

func (l *RLsOperation) Execute(args []string) error {
	if len(args) == 0 {
		fmt.Println("error: 请输入远程路径")
		return fmt.Errorf("请输入远程路径")
	}
	ls.Rls(args[0])
	return nil
}
